package com.windoent.yugioh.ui.activity;

import android.content.Context;
import android.content.Intent;

import com.windoent.yugioh.bean.multi.FeedbackUpLoadImageBean;
import com.windoent.yugioh.constants.Constants;
import com.windoent.yugioh.ui.activity.saishi.GameActivity;
import com.windoent.yugioh.ui.activity.some.PhotoViewActivity;
import com.windoent.yugioh.ui.activity.some.photoviewpager.PhotoViewPagerActivity;

import java.io.Serializable;
import java.util.List;

/**
 * author : robert
 * date   : 2021/5/12 14:35
 * desc   :
 */
public class JumpHelper {
    //放大网络图片
    public static void startPhotoViewNet(Context activity, String url) {
        Intent intent = new Intent(activity, PhotoViewActivity.class);
        intent.putExtra(Constants.PHOTOURL, url);
        activity.startActivity(intent);
    }

    public static void startPhotoViewPager(Context activity, int currentPosition, List<FeedbackUpLoadImageBean> data) {
        Intent intent = new Intent(activity, PhotoViewPagerActivity.class);
        intent.putExtra("currentPosition", currentPosition);
        intent.putExtra("pagerviewlistdataBean", (Serializable) data);
        activity.startActivity(intent);
    }

    //游戏tab
    public static void startGameTab(Context mContext, String id, String rule) {
        Intent intent = new Intent(mContext, GameActivity.class);
        intent.putExtra("id", id);
        intent.putExtra("rule", rule);
        mContext.startActivity(intent);
    }
}
